package net.neptech.feign;

import net.neptech.dto.sys.DeptStaffVo;
import net.neptech.model.sys.User;
import net.neptech.model.sys.Dept;
import net.neptech.vm.ResponseResult;
import org.springframework.cloud.client.loadbalancer.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Set;

@FeignClient("system")
public interface SystemFeignClient {
    /**
     * 批量查询员工基本信息
     *
     * @param staffIds
     * @return
     */
    @PostMapping("system/staff/getStaffsByStaffIds")
    ResponseResult<List<DeptStaffVo>> getByStaffIds(@RequestBody List<Long> staffIds);

    /**
     * 获取当前用户的角色列表
     */
    @GetMapping("system/api/permission/roles")
    ResponseResult<Set<String>> getUserRoles();

    /**
     * 获取当前用户的权限列表
     */
    @GetMapping("/api/permission/permissions")
    ResponseResult<Set<String>> getUserPermissions();

//    /**
//     * 根据科室名称获取科室详情
//     */
//    @PostMapping("system/dept/getDeptDetailByDeptName")
//    ResponseResult<List<Dept>> getDeptDetailByDeptName(@RequestBody String deptName);

    /**
     * 获取用户信息
     */

    @PostMapping("/system/user/selectUser")
    public ResponseResult<User> selectUser(@RequestBody User user) ;

    @GetMapping("/system/user/selectByUserId")
    public ResponseResult<User> selectByUserId(@RequestParam("userId") Long userId) ;

}
